final class Npc extends ObjectInstance {
	NpcDefinition npc;

	private final Model method580() {
		if (((ObjectInstance) this).anInt1624 >= 0
			&& ((ObjectInstance) this).anInt1627 == 0) {
			int i_0_ = (Sequence.sequences[((ObjectInstance) this).anInt1624].anIntArray295[((ObjectInstance) this).anInt1625]);
			int i_1_ = -1;
			if (((ObjectInstance) this).anInt1588 >= 0
				&& (((ObjectInstance) this).anInt1588 != ((ObjectInstance) this).anInt1634)) {
				i_1_ = (Sequence.sequences[((ObjectInstance) this).anInt1588].anIntArray295[((ObjectInstance) this).anInt1589]);
			}
			return ((this).npc
				.method373(
					i_0_,
					i_1_,
					0,
					(Sequence.sequences[((ObjectInstance) this).anInt1624].anIntArray299)));
		}
		int i_2_ = -1;
		if (((ObjectInstance) this).anInt1588 >= 0) {
			i_2_ = (Sequence.sequences[((ObjectInstance) this).anInt1588].anIntArray295[((ObjectInstance) this).anInt1589]);
		}
		return (this).npc.method373(i_2_, -1, 0, null);
	}

	@Override
	public final Model method572(byte i) {
		if (i == 3) {
		} else {
			throw new NullPointerException();
		}
		if ((this).npc == null) {
			return null;
		}
		Model model = method580();
		if (model == null) {
			return null;
		}
		((ObjectInstance) this).height = model.anInt1475;
		if (((ObjectInstance) this).anInt1614 != -1
			&& ((ObjectInstance) this).anInt1615 != -1) {
			SpotAnimation spotAnimation = (SpotAnimation.spotAnims[((ObjectInstance) this).anInt1614]);
			Model model_3_ = spotAnimation.method307();
			if (model_3_ != null) {
				int i_4_ = (spotAnimation.sequence.anIntArray295[((ObjectInstance) this).anInt1615]);
				Model model_5_ = (new Model(
false, false, true, model_3_, Class21.method239(i_4_)));
				model_5_.method601(0, 0, false,
					-((ObjectInstance) this).anInt1618);
				model_5_.method595(7);
				model_5_.method596(i_4_, (byte) 6);
				model_5_.anIntArrayArray1679 = null;
				model_5_.anIntArrayArray1678 = null;
				if (spotAnimation.anInt561 != 128 || spotAnimation.anInt562 != 128) {
					model_5_.method604(spotAnimation.anInt562, spotAnimation.anInt561, 9,
						spotAnimation.anInt561);
				}
				model_5_.preProcess(spotAnimation.anInt564 + 64, spotAnimation.anInt565 + 850,
					-30, -50, -30, true);
				Model[] class50_sub1_sub4_sub4s = { model,
					model_5_ };
				model = new Model(2, true, 0,
					class50_sub1_sub4_sub4s);
			}
		}
		if ((this).npc.aByte642 == 1) {
			model.aBoolean1680 = true;
		}
		return model;
	}

	@Override
	public final boolean method576(int i) {
		if (i != 0) {
			throw new NullPointerException();
		}
		if ((this).npc == null) {
			return false;
		}
		return true;
	}
}
